/* 
 * File:   lancement.cpp
 * Author: groupe1
 *
 * Created on 11 novembre 2008, 13:09
 */

# include <stdlib.h>
# include <stdio.h>
# include <cstdlib>
# include <iostream>
# include <iomanip>
# include <cmath>
# include "math.h"
# include "pricing.h"
# include <vector>
#include <time.h>

using namespace std;

int main(int argc, char** argv) {

  vector<double> vol(8);
  vector<double> ind0(8);
  vector<double> indt(8);
  vector<double> moy_perf_pan_t(3);

  int nbsim=1;
  double r=0.0415;

  double t = 0;
  double T=1;
  double eps=0.00001;

  int periode=52;

  srand((unsigned int)time(NULL));
	
  moy_perf_pan_t[0]=0;
  moy_perf_pan_t[1]=0;
  moy_perf_pan_t[2]=0;
  
  ind0[0]=3558.66;
  ind0[1]=1330.74;
  ind0[2]=11964.16;
  ind0[3]=1761.05;
  ind0[4]=210.02;
  ind0[5]=2377.3;
  ind0[6]=201.79;
  ind0[7]=8334.67;
  
  indt[0]=3558.66;
  indt[1]=1330.74;
  indt[2]=11964.16;
  indt[3]=1761.05;
  indt[4]=210.02;
  indt[5]=2377.3;
  indt[6]=201.79;
  indt[7]=8334.67;
  
  vol[0]=0.1130;
  vol[1]=0.1123;
  vol[2]=0.1478;
  vol[3]=0.1422;
  vol[4]=0.1341;
  vol[5]=0.1955;
  vol[6]=0.1401;
  vol[7]=0.2296;

  MonteCarlo pricer;
  //pricer.calcul_prix(260,ind0,indt,moy_perf_pan_t,t,T,nbsim,vol,r); 

	pricer.graph_prix(nbsim,periode,vol,ind0,ind0,r,T,eps);

  //pricer.calcul_delta(260,ind0,indt,moy_perf_pan_t,t,T,nbsim,vol,r,eps); 


  return (EXIT_SUCCESS);
}
